layui.use(['form','layer','table','util'],function(){
    var form = layui.form,
        layer = parent.layer === undefined ? layui.layer : top.layer,
        $ = layui.jquery,
        util = layui.util;


    // 监听提交
    form.on("submit(submit)",function(data){

        $.post("/user/login",data.field,
            function (data) {
                layer.msg(data.msg);
                if(data.status == 200){
                    setTimeout(function () {
                        location.href = "/page/common/index";
                    }, 500);
                }
            }
        );

        return false;
    })
});